Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move disabling of rc overrides up to RC_Channel base class #9275

Merged

Conversation

peterbarker
Copy link
Contributor

This allows rc overrides to be disabled on a Rover with an aux switch (as they can on Copter).

This will stop situations like we currently have where the
MANUAL_CONTROL GCS mavlink packets can still affect the vehicle

Also resolves an issue where has_new_overrides may not be set
appropriately
This shouldn't really in in RC_Channels - when we move the mavlink
packet handling up to the GCS_MAVLink base class we should move this
into there.
Use RC_Channels::has_active_overrides() instead
Copy link
Member

@OXINARF OXINARF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the autotest comment, LGTM!

want_speed = 2.0
print("Speed=%f want=<%f" % (m.groundspeed, want_speed))
if m.groundspeed < want_speed:
break
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it make more sense to compare the actual PWM value like was done before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The subsequent test is checking the vehicle's speed, so this is consistent.

return;
}

// Nobody ever talks to us. Log an error and enter failsafe.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want more of these comments in our code! 🤣

@peterbarker peterbarker merged commit 450052a into ArduPilot:master Sep 5, 2018
@peterbarker peterbarker deleted the rewrite-read-radio-failsafe branch September 5, 2018 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants